package com.suray.attendance.model.enums.erp;

import com.suray.attendance.model.bean.*;
import com.suray.attendance.model.pojo.ProductionDataCollectDetailInfo;

public enum ErpApiServerNameEnum {
    维护工单("e10.oapi.wo", Mo.class),
    维护生产信息收集单("e10.oapi.production.data.collect", ProductionDataCollectInfo.class),
    考勤报工收集单("yreport.sf_data_collect.query", ProductionDataCollectDetailInfo.class);


    private String serverName;
    private Class classType;

    ErpApiServerNameEnum(String serverName, Class classType) {
        this.serverName = serverName;
        this.classType = classType;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public Class getClassType() {
        return classType;
    }

    public void setClassType(Class classType) {
        this.classType = classType;
    }

    public static ErpApiServerNameEnum getServerNameAndClassTypeByDocTypeName(String docTypeName) {
        ErpApiServerNameEnum arrObj[] = ErpApiServerNameEnum.values();
        for (ErpApiServerNameEnum obj : arrObj) {
            if (obj.name().equals(docTypeName)) {
                return obj;
            }
        }
        return null;
    }


}
